﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bystd.DbFactory.DbSqlProvider.SqlFunctions
{
   public class Min: FunctionsBase, IFunction
    {
        public Min(string columnName, string columnAlias = "")
             : base(columnName, columnAlias) { }

        public override string ToString()
        {
            return string.Format("Min({0}) {1}",
                ColumnName, string.IsNullOrEmpty(ColumnAlias) ? string.Empty : "as " + ColumnAlias + " ");
        }
    }
}
